--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit 97a8b071a5e62a63995fab84ebbb7b710e18b4ab
Parents : 0d54027
Author : Ivan <ivan@quad4.io>
Signature : Signature validation error
Date : 2026-04-13T17:35:00-05:00
feat(auto_propagation): integrate AsyncUtils for asynchronous websocket client updates during node selection
Changes
1 files changed, 7 insertions(+), 1 deletions(-)
Diff
diff --git a/meshchatx/src/backend/auto_propagation_manager.py b/meshchatx/src/backend/auto_propagation_manager.py
index 3ed2ab28..5ee3b781 100644
--- a/meshchatx/src/backend/auto_propagation_manager.py
+++ b/meshchatx/src/backend/auto_propagation_manager.py
@@ -4,6 +4,7 @@ import time
import RNS
from LXMF.LXMRouter import LXMRouter
+from meshchatx.src.backend.async_utils import AsyncUtils
from meshchatx.src.backend.meshchat_utils import parse_lxmf_propagation_node_app_data
_PROP_FAILURE_STATES = frozenset(
@@ -131,7 +132,9 @@ class AutoPropagationManager:
if not sorted_candidates:
return
- previous_hex = self.config.lxmf_preferred_propagation_node_destination_hash.get()
+ previous_hex = (
+ self.config.lxmf_preferred_propagation_node_destination_hash.get()
+ )
ordered: list[tuple[int, str]] = []
seen_hex: set[str] = set()
if previous_hex and previous_hex in best_by_hex:
@@ -163,6 +166,9 @@ class AutoPropagationManager:
self.config.lxmf_preferred_propagation_node_destination_hash.set(
node_hex,
)
+ AsyncUtils.run_async(
+ self.app.send_config_to_websocket_clients(context=ctx),
+ )
return
if previous_hex:
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────